package com.jd.finance.core.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jd.finance.core.pojo.entity.BankApply;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jd.finance.result.BaseResult;
import org.apache.ibatis.annotations.Param;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 * 银行申请表 服务类
 * </p>
 *
 * @author LiQingBo
 * @since 2022-05-25
 */
public interface BankApplyService extends IService<BankApply> {

    /**
     * 申请添加合作银行
     * @param uid
     * @param appLybName
     * @param appLybAgreement
     * @param appLyAddress
     * @param request
     * @return
     */
    BaseResult insertCoopBank(@Param("uid") Integer uid, @Param("appLybName") String appLybName, @Param("appLybAgreement") String appLybAgreement, @Param("appLyAddress") String appLyAddress, @Param("request") HttpServletRequest request);

    /**
     * 修改合作银行审批状态
     * @param uid
     * @param bankAppId
     * @param appLyStatus
     * @param request
     * @return
     */
    BaseResult updateExamApply(@Param("uid") Integer uid, @Param("bankAppId") Integer bankAppId, @Param("appLyStatus") String appLyStatus, @Param("request") HttpServletRequest request);

    /**
     * 查询 合作银行 申请 的 申请状态
     * @param pageParam
     * @param uid
     * @param request
     * @return
     */
    Page<BankApply> getExamStatus(@Param("pageParam") Page<BankApply> pageParam, @Param("uid") Integer uid, @Param("request") HttpServletRequest request);

    /**
     * 根据合作银行，获取相应申请状态
     * @param uid
     * @param appLyId
     * @return
     */
    BaseResult getBankApplyInfo(@Param("uid") Integer uid, @Param("appLyId") Integer appLyId);

    /**
     * 添加合作银行
     * @param uid
     * @param appLyId
     * @param request
     * @return
     */
    BaseResult addCoopBank(@Param("uid") Integer uid, @Param("appLyId") Integer appLyId, @Param("request") HttpServletRequest request);
}
